let _import = file => () => import('@/page/' + file + '.vue');
export const routes = [
  {
    path: '/',
    name: 'main',
    meta: { token: false },
    component: _import('main')
  },
  {
    path: '/login',
    name: 'login',
    meta: { token: true },
    component: _import('login')
  },
  {
    path: '/singup',
    name: 'singup',
    meta: { token: true },
    component: _import('singup')
  },
  {
    path: '/forget',
    name: 'forget',
    meta: { token: false },
    component: _import('forget')
  },
  {
    path: '/user',
    name: 'user',
    meta: { token: false, index: 20 },
    component: _import('user'),
    children: [
      {
        path: '/user/email',
        name: 'user_email',
        meta: { token: false },
        component: _import('user/email')
      },
      {
        path: '/user/email/change',
        name: 'user_email_change',
        meta: { token: false },
        component: _import('user/email-change')
      },
      {
        path: '/user/bank',
        name: 'user_bank',
        meta: { token: false },
        component: _import('user/bank')
      },
      {
        path: '/user/bank/detail',
        name: 'user_bank_detail',
        meta: { token: false },
        component: _import('user/bank-detail')
      },
      {
        path: '/user/wechat',
        name: 'user_wechat',
        meta: { token: false },
        component: _import('user/wechat')
      },
      {
        path: '/user/alipay',
        name: 'user_alipay',
        meta: { token: false },
        component: _import('user/alipay')
      },
      {
        path: '/user/pass',
        name: 'user_pass',
        meta: { token: false },
        component: _import('user/pass')
      },
      {
        path: '/user/pass/change',
        name: 'user_pass_change',
        meta: { token: false },
        component: _import('user/pass-change')
      },
      {
        path: '/user/trade',
        name: 'user_trade',
        meta: { token: false },
        component: _import('user/trade')
      },
      {
        path: '/user/trade/change',
        name: 'user_trade_change',
        meta: { token: false },
        component: _import('user/trade-change')
      },
      // {
      //   path: '/user/trade/set',
      //   name: 'user_trade_set',
      //   meta: { token: false },
      //   component: _import('user/trade-set')
      // },
      {
        path: '/user/phone',
        name: 'user_phone',
        meta: { token: false },
        component: _import('user/phone')
      },
      {
        path: '/user/phone/change',
        name: 'user_phone_change',
        meta: { token: false },
        component: _import('user/phone-change')
      },
      {
        path: '/user/realname',
        name: 'user_realname',
        meta: { token: false },
        component: _import('user/realname')
      }
    ]
  },
  {
    path: '/msg',
    name: 'msg_list',
    meta: { token: false, index: 10 },
    component: _import('msg/list')
  },
  {
    path: '/msg/detail',
    name: 'msg_detail',
    meta: { token: false, index: 10 },
    component: _import('msg/detail')
  },
  {
    path: '/c2c',
    name: 'c2c',
    meta: { token: false, index: 3 },
    component: _import('c2c'),
    children: [
      {
        path: '/c2c',
        name: 'c2c_list',
        meta: { token: false },
        component: _import('c2c/list')
      },
      {
        path: '/c2c/detail',
        name: 'c2c_detail',
        meta: { token: false },
        component: _import('c2c/detail')
      },
      {
        path: '/c2c/advert',
        name: 'c2c_advert',
        meta: { token: false },
        component: _import('c2c/advert')
      },
      {
        path: '/c2c/trade',
        name: 'c2c_trade',
        meta: { token: false },
        component: _import('c2c/trade')
      },
      {
        path: '/c2c/trade/list',
        name: 'c2c_trade_list',
        meta: { token: false },
        component: _import('c2c/trade-list')
      }
    ]
  },
  {
    path: '/asset',
    name: 'asset',
    meta: { token: false, index: 17 },
    component: _import('asset'),
    children: [
      {
        path: '/asset',
        name: 'asset_list',
        meta: { token: false },
        component: _import('asset/list')
      },
      {
        path: '/asset/recharge',
        name: 'asset_recharge',
        meta: { token: false },
        component: _import('asset/recharge')
      },
      {
        path: '/asset/withdraw',
        name: 'asset_withdraw',
        meta: { token: false },
        component: _import('asset/withdraw')
      },
      {
        path: '/asset/record',
        name: 'asset_record',
        meta: { token: false },
        component: _import('asset/record')
      },
      {
        path: '/asset/record/detail',
        name: 'asset_record_detail',
        meta: { token: false },
        component: _import('asset/record-detail')
      }
    ]
  },
  {
    path: '/manage',
    name: 'manage',
    meta: { token: false, index: 11 },
    component: _import('manage'),
    children: [
      {
        path: '/manage/entrust',
        name: 'manage_entrust',
        meta: { token: false },
        component: _import('manage/entrust')
      },
      {
        path: '/manage/dispute',
        name: 'manage_dispute',
        meta: { token: false },
        component: _import('manage/dispute')
      },
      {
        path: '/manage/disrecord',
        name: 'manage_disrecord',
        meta: { token: false },
        component: _import('manage/dispute-record')
      },
      {
        path: '/manage/dispute/detail',
        name: 'dispute_detail',
        meta: { token: false },
        component: _import('manage/dispute-detail')
      },
      {
        path: '/manage/history',
        name: 'manage_history',
        meta: { token: false },
        component: _import('manage/history')
      },
      {
        path: '/manage/order',
        name: 'manage_order',
        meta: { token: false },
        component: _import('manage/order')
      },
      {
        path: '/manage/myorder',
        name: 'manage_myorder',
        meta: { token: false },
        component: _import('manage/my-order')
      },
      {
        path: '/manage/order/shelf',
        name: 'manage_order/shelf',
        meta: { token: false },
        component: _import('manage/shelf-order')
      }
    ]
  },
  {
    path: '/coins',
    name: 'coins',
    meta: { token: false, index: 2 },
    component: _import('coins'),
    children: [
      {
        path: '/coins',
        name: 'coins_list',
        meta: { token: false },
        component: _import('coins/list')
      },
      {
        path: '/coins/detail',
        name: 'coins_detail',
        meta: { token: false },
        component: _import('coins/detail')
      }
    ]
  }
];